package org.shj.pattern.simplefactory;

public class CashFactory {

	public static Cash createCashAccept(String type){
		Cash cs= null;
		switch(type){
			case "Normal":
				cs = new CashNormal();
				break;
			case "打8折":
				cs = new CashRebate(0.8);
				break;
			case "满300送50":
				cs = new CashReturn(300, 50);
				break;
		}
		return cs;
	}
}
